package com.rocsun.controller;

import com.rocsun.service.HelloService;
import org.apache.dubbo.config.annotation.Reference;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/hello")
public class HelloController {

    @Reference
    private HelloService helloService;

    @GetMapping(value = "/sayHello")
    public String sayHello() {
        return helloService.sayHello();
//        return "hello world!";
    }

}